/**
 * msgcli.h
 *
 *  Created on: 16 Dec 2010
 *      Author: marco
 */



#ifndef MSGCLI_H_
#define MSGCLI_H_


#define TRIALS 5
#define WAIT 1


#define UNIX_PATH_MAX 108
#define MSGSOCK_PATH "./tmp/msgsock"

/*Comandi utente*/
#define LIST "%LIST"
#define EXIT "%EXIT"
#define ONE "%ONE"

/*Patterns di riconoscimento comandi*/
#define ONE_PAT "%ONE[ ]*[ ]*"


int init(char*);
void menu();
int name_check(char* );

void* to_server(void*);
int parse(message_t *);

int parse_message(message_t*);

void* from_server(void*);

#endif /* MSGCLI_H_ */
